import schoolSignature from "@/api/officialDocument/schoolSignature/index";
const state = {
  recipient:[]
};
const mutations = {
  SET_RECIPIENT: (state, params) => {
    state.recipient = params
  },
};
const actions = {
  toSendNode({ commit }, data){
    return new Promise((resolve, reject)=> {
      schoolSignature.docuemntNotice(data).then(res=>{
        commit("SET_RECIPIENT", data.recipient);
        resolve(res)
      })
    }).catch(()=>{
      reject()
    });
  },
  getDocumentNode({ commit }, data){
    return new Promise((resolve, reject)=> {
      schoolSignature.getDocumentNotice(data).then(res=>{
        resolve(res)
      })
    }).catch(()=>{
      reject()
    });
  },
};
export default {
  namespaced: true,
  state,
  mutations,
  actions
};
